<?
include 'DatabaseConnect.inc';



if(isset($_POST['username']))
{
	$UserName = $_POST['username'];
	$query = "SELECT count(*) from User WHERE LoginID='".$UserName."'";
	$result = mysql_query($query);
	$row = mysql_fetch_row($result);
	$count = $row[0];
	if($count > 0)
	{
		echo "<SCRIPT type='text/Javascript'>";
		echo " alert ('Username Taken.  Please choose a new one.');";
		echo "</SCRIPT>";
		include "CreateAccountForm.php";
	}

	if($count==0)
	{
		include 'updateNewAccount.php';
	}
}
else
{
	include "CreateAccountForm.php";
}
?>